#include <reg52.h>
typedef unsigned char uint8;
typedef unsigned int uint16;
sbit ENLED=P1^4;
sbit ADDR0=P1^0;
sbit ADDR1=P1^1;
sbit ADDR2=P1^2;
sbit ADDR3=P1^3;
sbit LED=P0^0;
void main()
{
	uint8 counter;
	ENLED=0;ADDR3=1;
	ADDR0=0;ADDR1=1;ADDR2=1;
	TMOD=0x01;//模式1: 高8位 低8位
	TF0=0;TR0=1;//开始计时
	TH0=0xB8; //12*(65536-x)/11059200=0.02s; x=471104 0xB8 0x00
	TL0=0x00;
	counter=0;
	while(1)
	{
		if(1==TF0)
		{
			TF0=0;
			TH0=0xB8;
			TL0=0x00;
			counter++;
		}
		if(50==counter)
		{
			LED=~LED;
			counter=0;
		}
	}
}